<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Ipopt: src/Common/IpLibraryLoader.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 40px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Ipopt Documentation
   &#160;<!--span id="projectnumber">3.14.12</span-->
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('IpLibraryLoader_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">IpLibraryLoader.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="IpLibraryLoader_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">// Copyright (C) 2021 COIN-OR Foundation</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">// All Rights Reserved.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">// This code is published under the Eclipse Public License.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; </div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#ifndef __IPLIBRARYLOADER_HPP__</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#define __IPLIBRARYLOADER_HPP__</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; </div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="IpReferenced_8hpp.html">IpReferenced.hpp</a>&quot;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="IpException_8hpp.html">IpException.hpp</a>&quot;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#ifdef _WIN32</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor"># define IPOPT_SHAREDLIBEXT &quot;dll&quot;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#elif defined(__APPLE__)</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor"># define IPOPT_SHAREDLIBEXT &quot;dylib&quot;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor"># define IPOPT_SHAREDLIBEXT &quot;so&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="IpLibraryLoader_8hpp.html#ad237f33f45491342dcbeb3323238276b">   17</a></span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceIpopt.html">Ipopt</a></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;{</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classIpopt_1_1LibraryLoader.html">   27</a></span>&#160;<span class="keyword">class </span><a class="code" href="config__default_8h.html#a58bb5c104ee5ff44b7175fc992d89b0b">IPOPTLIB_EXPORT</a> <a class="code" href="classIpopt_1_1LibraryLoader.html">LibraryLoader</a> : <span class="keyword">public</span> <a class="code" href="classIpopt_1_1ReferencedObject.html">ReferencedObject</a></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;{</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classIpopt_1_1LibraryLoader.html#a53f383974bf782ce7820ed5455bb0b48">   30</a></span>&#160;   std::string <a class="code" href="classIpopt_1_1LibraryLoader.html#a53f383974bf782ce7820ed5455bb0b48">libname</a>;</div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classIpopt_1_1LibraryLoader.html#aae532ae19f12f7524acbdf66d096074b">   31</a></span>&#160;   <span class="keywordtype">void</span>* <a class="code" href="classIpopt_1_1LibraryLoader.html#aae532ae19f12f7524acbdf66d096074b">libhandle</a>;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classIpopt_1_1LibraryLoader.html#a2a9283f3aaee8c34ec4da03591bef15c">   34</a></span>&#160;   <a class="code" href="classIpopt_1_1LibraryLoader.html#a2a9283f3aaee8c34ec4da03591bef15c">LibraryLoader</a>(<span class="keyword">const</span> <a class="code" href="classIpopt_1_1LibraryLoader.html">LibraryLoader</a>&amp;);</div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classIpopt_1_1LibraryLoader.html#a9c9369f7166f7eab8327b8b5fe2b5fbe">   36</a></span>&#160;   <a class="code" href="classIpopt_1_1LibraryLoader.html">LibraryLoader</a>&amp; <a class="code" href="classIpopt_1_1LibraryLoader.html#a9c9369f7166f7eab8327b8b5fe2b5fbe">operator=</a>(<span class="keyword">const</span> <a class="code" href="classIpopt_1_1LibraryLoader.html">LibraryLoader</a>&amp;);</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classIpopt_1_1LibraryLoader.html#a5cef7c614bc5803942c78ccbc3ceba7a">   40</a></span>&#160;   <a class="code" href="classIpopt_1_1LibraryLoader.html#a5cef7c614bc5803942c78ccbc3ceba7a">LibraryLoader</a>(</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;      <span class="keyword">const</span> std::string&amp; libname_  </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;   )</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;      : libname(libname_),</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        libhandle(NULL)</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;   { }</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classIpopt_1_1LibraryLoader.html#a73a868fdeb646a3cce642ed135ca3bf3">   48</a></span>&#160;   <a class="code" href="classIpopt_1_1LibraryLoader.html#a73a868fdeb646a3cce642ed135ca3bf3">~LibraryLoader</a>()</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;   {</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;      unloadLibrary();</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;   }</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classIpopt_1_1LibraryLoader.html#a3ddb850c3d633c1f7ab1f01a61e4ed7d">   54</a></span>&#160;   <span class="keywordtype">void</span> <a class="code" href="classIpopt_1_1LibraryLoader.html#a3ddb850c3d633c1f7ab1f01a61e4ed7d">loadLibrary</a>();</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classIpopt_1_1LibraryLoader.html#af6547f11835bdc254ccda2a97c294f8a">   57</a></span>&#160;   <span class="keywordtype">void</span> <a class="code" href="classIpopt_1_1LibraryLoader.html#af6547f11835bdc254ccda2a97c294f8a">unloadLibrary</a>();</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classIpopt_1_1LibraryLoader.html#a826cbe1088b7669f6166ddbd9bbd47c4">   63</a></span>&#160;   <span class="keywordtype">void</span>* <a class="code" href="classIpopt_1_1LibraryLoader.html#a826cbe1088b7669f6166ddbd9bbd47c4">loadSymbol</a>(</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;      <span class="keyword">const</span> std::string&amp; symbolname  </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;   );</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;};</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="namespaceIpopt.html#a2060db15964a17310fd428fabb199fbe">   72</a></span>&#160;<a class="code" href="namespaceIpopt.html#a0f801dea559a0db57bc99d01a8d50dd4">DECLARE_STD_EXCEPTION</a>(DYNAMIC_LIBRARY_FAILURE);</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;} <span class="comment">// namespace Ipopt</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __IPLIBRARYLOADER_HPP__ */</span><span class="preprocessor"></span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclassIpopt_1_1LibraryLoader_html"><div class="ttname"><a href="classIpopt_1_1LibraryLoader.html">Ipopt::LibraryLoader</a></div><div class="ttdoc">loading of a library at runtime</div><div class="ttdef"><b>Definition:</b> <a href="IpLibraryLoader_8hpp_source.html#l00027">IpLibraryLoader.hpp:28</a></div></div>
<div class="ttc" id="aclassIpopt_1_1LibraryLoader_html_a53f383974bf782ce7820ed5455bb0b48"><div class="ttname"><a href="classIpopt_1_1LibraryLoader.html#a53f383974bf782ce7820ed5455bb0b48">Ipopt::LibraryLoader::libname</a></div><div class="ttdeci">std::string libname</div><div class="ttdef"><b>Definition:</b> <a href="IpLibraryLoader_8hpp_source.html#l00030">IpLibraryLoader.hpp:30</a></div></div>
<div class="ttc" id="aclassIpopt_1_1LibraryLoader_html_a5cef7c614bc5803942c78ccbc3ceba7a"><div class="ttname"><a href="classIpopt_1_1LibraryLoader.html#a5cef7c614bc5803942c78ccbc3ceba7a">Ipopt::LibraryLoader::LibraryLoader</a></div><div class="ttdeci">LibraryLoader(const std::string &amp;libname_)</div><div class="ttdoc">constructor</div><div class="ttdef"><b>Definition:</b> <a href="IpLibraryLoader_8hpp_source.html#l00040">IpLibraryLoader.hpp:40</a></div></div>
<div class="ttc" id="aclassIpopt_1_1LibraryLoader_html_a9c9369f7166f7eab8327b8b5fe2b5fbe"><div class="ttname"><a href="classIpopt_1_1LibraryLoader.html#a9c9369f7166f7eab8327b8b5fe2b5fbe">Ipopt::LibraryLoader::operator=</a></div><div class="ttdeci">LibraryLoader &amp; operator=(const LibraryLoader &amp;)</div><div class="ttdoc">unimplemented assigment operator</div></div>
<div class="ttc" id="aclassIpopt_1_1LibraryLoader_html_a3ddb850c3d633c1f7ab1f01a61e4ed7d"><div class="ttname"><a href="classIpopt_1_1LibraryLoader.html#a3ddb850c3d633c1f7ab1f01a61e4ed7d">Ipopt::LibraryLoader::loadLibrary</a></div><div class="ttdeci">void loadLibrary()</div><div class="ttdoc">tries to load library</div></div>
<div class="ttc" id="aclassIpopt_1_1LibraryLoader_html_af6547f11835bdc254ccda2a97c294f8a"><div class="ttname"><a href="classIpopt_1_1LibraryLoader.html#af6547f11835bdc254ccda2a97c294f8a">Ipopt::LibraryLoader::unloadLibrary</a></div><div class="ttdeci">void unloadLibrary()</div><div class="ttdoc">unload library, if loaded</div></div>
<div class="ttc" id="anamespaceIpopt_html"><div class="ttname"><a href="namespaceIpopt.html">Ipopt</a></div><div class="ttdoc">This file contains a base class for all exceptions and a set of macros to help with exceptions.</div><div class="ttdef"><b>Definition:</b> <a href="IpInexactAlgBuilder_8hpp_source.html#l00013">IpInexactAlgBuilder.hpp:14</a></div></div>
<div class="ttc" id="aconfig__default_8h_html_a58bb5c104ee5ff44b7175fc992d89b0b"><div class="ttname"><a href="config__default_8h.html#a58bb5c104ee5ff44b7175fc992d89b0b">IPOPTLIB_EXPORT</a></div><div class="ttdeci">#define IPOPTLIB_EXPORT</div><div class="ttdef"><b>Definition:</b> <a href="config__default_8h_source.html#l00011">config_default.h:10</a></div></div>
<div class="ttc" id="aclassIpopt_1_1LibraryLoader_html_a73a868fdeb646a3cce642ed135ca3bf3"><div class="ttname"><a href="classIpopt_1_1LibraryLoader.html#a73a868fdeb646a3cce642ed135ca3bf3">Ipopt::LibraryLoader::~LibraryLoader</a></div><div class="ttdeci">~LibraryLoader()</div><div class="ttdoc">destructor</div><div class="ttdef"><b>Definition:</b> <a href="IpLibraryLoader_8hpp_source.html#l00048">IpLibraryLoader.hpp:48</a></div></div>
<div class="ttc" id="aclassIpopt_1_1LibraryLoader_html_aae532ae19f12f7524acbdf66d096074b"><div class="ttname"><a href="classIpopt_1_1LibraryLoader.html#aae532ae19f12f7524acbdf66d096074b">Ipopt::LibraryLoader::libhandle</a></div><div class="ttdeci">void * libhandle</div><div class="ttdef"><b>Definition:</b> <a href="IpLibraryLoader_8hpp_source.html#l00031">IpLibraryLoader.hpp:31</a></div></div>
<div class="ttc" id="aIpReferenced_8hpp_html"><div class="ttname"><a href="IpReferenced_8hpp.html">IpReferenced.hpp</a></div></div>
<div class="ttc" id="aclassIpopt_1_1LibraryLoader_html_a826cbe1088b7669f6166ddbd9bbd47c4"><div class="ttname"><a href="classIpopt_1_1LibraryLoader.html#a826cbe1088b7669f6166ddbd9bbd47c4">Ipopt::LibraryLoader::loadSymbol</a></div><div class="ttdeci">void * loadSymbol(const std::string &amp;symbolname)</div><div class="ttdoc">tries to load symbol</div></div>
<div class="ttc" id="aIpException_8hpp_html"><div class="ttname"><a href="IpException_8hpp.html">IpException.hpp</a></div></div>
<div class="ttc" id="anamespaceIpopt_html_a0f801dea559a0db57bc99d01a8d50dd4"><div class="ttname"><a href="namespaceIpopt.html#a0f801dea559a0db57bc99d01a8d50dd4">Ipopt::DECLARE_STD_EXCEPTION</a></div><div class="ttdeci">DECLARE_STD_EXCEPTION(FATAL_ERROR_IN_LINEAR_SOLVER)</div></div>
<div class="ttc" id="aclassIpopt_1_1ReferencedObject_html"><div class="ttname"><a href="classIpopt_1_1ReferencedObject.html">Ipopt::ReferencedObject</a></div><div class="ttdoc">Storing the reference count of all the smart pointers that currently reference it.</div><div class="ttdef"><b>Definition:</b> <a href="IpReferenced_8hpp_source.html#l00169">IpReferenced.hpp:170</a></div></div>
<div class="ttc" id="aclassIpopt_1_1LibraryLoader_html_a2a9283f3aaee8c34ec4da03591bef15c"><div class="ttname"><a href="classIpopt_1_1LibraryLoader.html#a2a9283f3aaee8c34ec4da03591bef15c">Ipopt::LibraryLoader::LibraryLoader</a></div><div class="ttdeci">LibraryLoader(const LibraryLoader &amp;)</div><div class="ttdoc">unimplemented copy constructor</div></div>
</body>
</html>
